package com.cib.yym.homepage.rpc.controller;

import java.util.List;


import com.cib.yym.homepage.bean.WeiboPost;
import com.yym.sina.weibo.WeiboService;
import com.yym.sina.weibo.WeiboServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
@RequestMapping(value="/weibo")
public class WeiboController {
	
	@RequestMapping(method=RequestMethod.GET)
	public @ResponseBody List<WeiboPost> getRecentWeiboPosts() {
		WeiboService ws = new WeiboServiceImpl();
		List<WeiboPost> result 
			= ws.getRecentUserPost(WeiboServiceImpl.myUid);
		return result;
	}
	
}
